Project:Support desk

About this board

Welcome to the MediaWiki Support desk. This is a place where you can ask any questions you have about installing, using or administrating the MediaWiki software.

(Read this message in a different language)

See also

Before you post

Post a new question

  1. To help us answer your questions, please indicate which version of MediaWiki you are using, as found on your wiki's Special:Version page:
  2. If possible, add $wgShowExceptionDetails = true;error_reporting( -1 );ini_set( 'display_errors', 1 ); to LocalSettings.php in order to make MediaWiki show more detailed error messages.
  3. Please include the web address (URL) to your wiki if possible. It's often easier for us to identify the source of the problem if we can see the error directly.
  4. To start a new thread, click the box with the text "Start a new topic".

PluggableAuth 7.1.0 alnog LDAPAuthentication2 on MediaWiki 1.41.1

2
Mohammad Safe (talkcontribs)
114.125.4.236 (talkcontribs)

Oojhhbd

Reply to "PluggableAuth 7.1.0 alnog LDAPAuthentication2 on MediaWiki 1.41.1"

Adding a template to a Mediawiki installation.

3
Summary by 200.68.128.156

A. Nadien

PeterEasthope (talkcontribs)

Hi,

My ISP allows an instance of Mediawiki 1.41.1. A color template renders as "Template:color" in red. Similarly for the font color template. Meaning that the templates are not available; correct? How can that be fixed? Where can definitions of the color and font color templates be found? How can I add them to my Mediawiki instance? Thanks, ... PeterEasthope (talk) 16:10, 7 May 2024 (UTC)

Bawolff (talkcontribs)
PeterEasthope (talkcontribs)

That gave documentation for using a template. What I want is the definition of the font color template; not instructions for use. I understand how it is used.
Thanks, ... PeterEasthope (talk) 00:53, 1 June 2024 (UTC)

Reply to "Adding a template to a Mediawiki installation."

Run Jobs failing due to "unexpected character 0x01"

2
Summary by ProbablePrime

Typo on my part :'(

ProbablePrime (talkcontribs)

Hello, My Manual:RunJobs.php is periodically failing on Cron with the message:

Parse error: syntax error, unexpected character 0x01, expecting end of file in /usr/local/bin/php on line 1000

My Crontab is:

*/5 * * * *     /usr/local/bin/php      /usr/local/bin/php /var/www/html/maintenance/run.php runJobs >> /var/log/runJobs.log 2>&1

Running the runJobs script manually via a shell, works though.

I'm a little lost in terms of debugging or diagnosing this as I'm not familiar with Mediawiki's source code etc.

Could anyone provide any suitable diagnostic or debugging steps that may help?

ProbablePrime (talkcontribs)

I accidentally included /usr/local/bin/php TWICE in the cron entry as shown in my initial post.

I apologize!

لقد وجدت ثغرة اختراق

2
Abobakr515 (talkcontribs)

لقد وجدت ثغرة اختراق في موقعكم واريد التواصل معكم ل اخباركم عنها معلومات خاصة

Clump (talkcontribs)
Reply to "لقد وجدت ثغرة اختراق"

Wiki "not found" after migrating server

1
155.190.60.27 (talkcontribs)

After migrating the server running the wiki to a different location, the apache homepage is visible but I get the following message when going into the domain that should lead to the wiki:

The requested URL /wiki/index.php/Main_Page was not found on this server.

Any ideas why this is? None of the settings or configurations have been changed, just the VM running it has been moved.

Reply to "Wiki "not found" after migrating server"

Instance of User getting string instead

1
Timmysworld (talkcontribs)

Hi, I am creating a video permissions extension for my wiki. I keep getting this error and not sure how to go about fixing it. [81e16b69894234cb8a025ff0] /wiki/Special:Upload TypeError: Argument 2 passed to VideoPermissionsHooks::onUploadVerifyUpload() must be an instance of User, string given, called in /var/www/html/w/includes/HookContainer/HookContainer.php on line 338

Reply to "Instance of User getting string instead"

{{!}} Doesn't work

4
Guillaume Taillefer (talkcontribs)

I was trying to use what is mentioned above in place of pipes to try and be able to insert tables into the description section of an image through UploadWizard, however the ! doesn't even work. I tried putting it outside of the description section outside of any template and it still didn't work. I read that the template for it wasn't being used anymore and that it was incorporated into the core of MediaWiki (of which mine is 1.41). Please help

Guillaume Taillefer (talkcontribs)

To clarify, I was trying to insert templates which were in the form of tables inside the description section which is part of another table

Novem Linguae (talkcontribs)

Diff? Screenshot? Steps to reproduce? You are right that {{!}} is a magic word, so some things that come to mind might be 1) maybe there is another character that needs escaping such as =, 2) a bug in the UploadWizard extension, 3) other? Can tell you more with more information supplied.

Guillaume Taillefer (talkcontribs)
Reply to "{{!}} Doesn't work"

strange section indentation Help:Contents

7
Wladek92 (talkcontribs)

i activate numbering of paragraphs in my user preferences. Then when displaying the page itself numbering is:

Sommaire
1 2 Welcome to MediaWiki.org help pages
2.1Reading
2.2Editing
2.3Advanced editing
2.4Collaboration
2.5Personal customization
2.6Wiki administration

Strange: There is nothing between level 1 and level 2 on first line and all is under level 2.

Then making modify source + preview with a forced TOC, all is under level 1:

Sommaire
1Welcome to MediaWiki.org help pages
1.1Reading
1.2Editing
1.3Advanced editing
1.4Collaboration
1.5Personal customization
1.6Wiki administration

Can someone analyse and correct the display ? Thanks. --Christian 🇫🇷 FR (talk) 09:04, 18 May 2024 (UTC)

Malyacko (talkcontribs)

What "page itself"? Please provide clear and full steps to reproduce something somewhere, including URLs.

Wladek92 (talkcontribs)
TheDJ (talkcontribs)

This might have something to do with the change of the heading structure that is rolling out. Although I have proper spacing between the numbers and the titles. I suggest we wait a week or so more, before fixing this to allow changes to settle down.

Wladek92 (talkcontribs)

thanks sometimes things appear strange to me, so I just warn. --Christian 🇫🇷 FR (talk) 10:18, 21 May 2024 (UTC)

Wladek92 (talkcontribs)
Wladek92 (talkcontribs)

More awful -> Manual_talk:LocalisationCache.php the numbering of the topics is doubled at each step :

1 2 role of this page ? 
3 4 ? as mentioned above

As a conclusion, with tag TOC numbering is ok, and with tag NOTOC and user-preferences requesting the numbering of headers, two numbers appear in front of each header.

--Christian 🇫🇷 FR (talk) 21:28, 30 May 2024 (UTC)

Reply to "strange section indentation Help:Contents"
79.139.200.96 (talkcontribs)

I was trying to get the template to call itself so that it would pull out specific information and paste it as text. The template stores information about recipes, but even though it is not an infinite recursion, it throws an error. Is there a way to make the template call itself?

Reply to "Recursions"

upload_tmp_dir - MediaWiki ignores php specified path

9
Arkasha (talkcontribs)

MediaWiki 1.17wmf1
PHP 5.2.12 (apache)
MySQL 5.0.90-log

There is a problem with a temporary folder path resolving.
Php on server side sets this directive as following:
upload_tmp_dir = /home/XXXXX/hdlwiki.com/tmp
and
open_basedir = /home/XXXXX/
However Wiki ignores these directives and tries to use /var/tmp
which is out of the allowed path.
This warning I received during Wiki installation:

     Warning: is_dir() [function.is-dir]: open_basedir restriction in effect.
File(/tmp) is not within the allowed path(s): (/home/XXXXX/) in /home/XXXXX/hdlwiki.com/www/config/Installer.php on line 474 Warning: Your session.save_path value (/tmp) appears to be invalid or is not writable.
PHP needs to be able to save data to this location for correct session operation.

As a result I cannot upload files by url. The system returns an error:

     Warning:  tempnam() [<a href='function.tempnam'>function.tempnam</a>]: open_basedir restriction in effect.
File(/var/tmp/) is not within the allowed path(s): (/home/XXXXX/)in/home/XXXXX/hdlwiki.com/www/includes/upload
/UploadFromUrl.php on line 101

What can be a solution for such problem.

Bawolff (talkcontribs)

Set the TMP (or TEMP or TMPDIR) environment variables for what you want your temp directory. (for the upload by url error)

For the install error, this can be caused if php is configured to store session files in the temp directory (sesssion.save_path in your php.ini). This should cause logins to not work at all, but perhaps only mediawiki is dissallowed, and php session handlers don't have the open_basedir restriction. If you get that warning when installing, but can still log in after the install is done, then the warning is in error, and is a bug in the installer (should probably file a bug about it).

Arkasha (talkcontribs)

Where should I set TMP variable? I have these in my LocalSettings.php

$wgEnableUploads  = true;
$wgAllowCopyUploads = true;
$wgUploadPath = "{$wgScriptPath}/images";
$wgUploadDirectory = "{$IP}/images";
$wgTmpDirectory = "{$wgUploadDirectory}/temp";

$wgGroupPermissions['sysop']['upload_by_url'] = true;

and I still have the above mentioned error. The folders for uploads are all writable. The Special:Upload shows Could not create temporary file. in red.

Bryan (talkcontribs)

putenv("TMP={$wgUploadDirectory}/temp");

UploadFromUrl appears to not support wgTmpDirectory, I believe this is a bug.

Bawolff (talkcontribs)

Really I'd consider it a bug in wfTempDir() function. Imports, and diffs (depending on config) are also affected.

Arkasha (talkcontribs)

Thank you! This solved the problem. Can it be fixed in the following MW release?

Bryan (talkcontribs)

Dunno if the fix will make it into 1.17, but in 1.18 it most likely will.

Narcisgarcia (talkcontribs)

I still see the problem in MediaWiki 1.41.1

  • If you can edit webserver site, you need to configure PHP's sys_temp_dir (this is the server's variable MediaWiki uses!)
  • If you can only edit CMS files, the only workaround is to add
$wgTmpDirectory = ini_get('upload_tmp_dir');
to LocalSettings.php
TheDJ (talkcontribs)
Reply to "upload_tmp_dir - MediaWiki ignores php specified path"